//
//  HomePageHeaderView.m
//  showCar
//
//  Created by whg－54 on 15/8/18.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HomePageHeaderView.h"

@interface HomePageHeaderView()



@end

@implementation HomePageHeaderView
#pragma mark - 重写dealloc

#pragma mark - 点击执行targetAction
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.target performSelector:self.action withObject:self];
}

- (void) addTarget: (id)target selector: (SEL)selector
{
    self.target = target;
    self.action = selector;
}

#pragma mark - 重写初始化方法
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {

        self.backgroundColor = [UIColor colorWithRed:141 / 255.0 green:162 / 255.0 blue:160 / 255.0 alpha:1];

        self.setupButton = [UIButton buttonWithType:UIButtonTypeCustom];
        /*添加点击事件*/
        [self.setupButton addTarget:self.delegate action:@selector(clickSetUpButton:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:self.setupButton];

        self.logo = [[UIImageView alloc]init];
        [self addSubview:self.logo];

        
    }
    return self;
}

- (void) layoutSubviews
{
    self.setupButton.frame = CGRectMake(323.0/375*self.frame.size.width, SAHeight * 25, 40.0/375*self.frame.size.width, SAHeight * 40);
    self.logo.frame = CGRectMake(20.0/375*self.frame.size.width, SAHeight * 25, 40.0/375*self.frame.size.width, SAHeight * 40);
    
    
}
@end
